// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 变更类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-03-07
 */
public enum EcnChangeTypeEnum {
    BOM_CHANGE(1, "BOM更改"),
    MATERIAL_RELEASE(2, "物料发布"),
    DRAWING_CHANGE(3, "图纸更改"),
    OTHER_CHANGE(4, "退市变更");

    private int value;

    private String name;

    EcnChangeTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        EcnChangeTypeEnum arrObj[] = EcnChangeTypeEnum.values();
        for (EcnChangeTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
